home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / Programming Contest / Secret Solutions Folder / Problem 09 - State Machine / Solution.h < prev   
Encoding:
C/C++ Source or Header  |  1998-06-08  |  646 b   |  23 lines  |  [TEXT/CWIE]

  1. #ifndef __SOLUTION_H__
  2. #define __SOLUTION_H__
  3.  
  4. // Do not modify this file
  5.  
  6. #include <MacTypes.h>
  7. #include <Files.h>
  8.  
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif // __cplusplus
  12.  
  13. typedef pascal UInt32 (*GetNextCharProc)(Handle state_machine, UInt32 curstate);
  14.  
  15. pascal void StateMachineInit( Handle  *state_machine, UInt32 states, UInt32 chars);
  16. pascal void AddTransition( Handle state_machine, UInt32 state1, UInt32 state2, UInt32 first_char, UInt32 last_char );
  17. pascal void RunStateMachine( Handle state_machine, UInt32 start_state, GetNextCharProc GetNextChar, UInt32 *stop_state);
  18.  
  19. #ifdef __cplusplus
  20. }
  21. #endif // __cplusplus
  22.  
  23. #endif // __SOLUTION_H__